import { uniFileUpload, request } from '@/utils/request';

export const getThMeetingApplyPage = (query?: object) => {
  return request<{ data: any }>({
    url: `/admin/thMeetingApply/page`,
    method: 'GET',
    query,
  });
};
export function fetchList(query?: object) {
  return request<{ data: any }>({
    url: '/admin/thMeetingApply/page',
    method: 'GET',
    query,
  });
}
export function addObj(obj?: object) {
  return request<{ data: any }>({ url: '/admin/thMeetingApply', method: 'POST', data: obj });
}
export function getObj(id?: string) {
  return request<{ data: any }>({ url: `/admin/thMeetingApply/${id}`, method: 'GET' });
}
export function getObjDetails(obj?: object) {
  return request<{ data: any }>({
    url: '/admin/thMeetingApply/details',
    method: 'GET',
    query: obj,
  });
}
export function delObj(ids?: object) {
  return request<{ data: any }>({
    url: '/admin/thMeetingApply',
    method: 'DELETE',
    data: ids,
  });
}
export function putObj(obj?: object) {
  return request<{ data: any }>({ url: '/admin/thMeetingApply', method: 'PUT', data: obj });
}

export function getSubmitProcess(query?: object) {
  return request<{ data: any }>({
    url: '/admin/thMeetingApply/submitProcess',
    method: 'GET',
    query,
  });
}

export function postRevoke(obj?: object) {
  return request<{ data: any }>({ url: '/admin/thMeetingApply/revoke', method: 'POST', data: obj });
}
// 同意 approve - true
// 拒绝 approve - false
export function complete(obj?: object) {
  return request<{ data: any }>({
    url: '/admin/thMeetingApply/complete',
    method: 'POST',
    data: obj,
  });
}

export function postAbandon(obj?: object) {
  return request<{ data: any }>({
    url: '/admin/thMeetingApply/abandon',
    method: 'POST',
    data: obj,
  });
}

export function getMeetingRoom(query?: object) {
  return request({ url: '/admin/thMeetingRoom/list', method: 'GET', query });
}

export function getHourChatList(query?: object) {
  return request({ url: '/admin/thMeetingApply/hourList', method: 'GET', query });
}

export function getWekChatList(query?: object) {
  return request({ url: '/admin/thMeetingApply/weekList', method: 'GET', query });
}

export function getRoomChatList(query?: object) {
  return request({ url: '/admin/thMeetingApply/roomList', method: 'GET', query });
}

export function getThMeetingRoom(query?: object) {
  return request({ url: '/admin/thMeetingRoom/listAll', method: 'GET', query });
}

export function getThWeekGanttList(query?: object) {
  return request({ url: '/admin/thMeetingApply/weekGanttList', method: 'GET', query });
}

export function getThHourGanttList(query?: object) {
  return request({ url: '/admin/thMeetingApply/hourGanttList', method: 'GET', query });
}

export function getThRoomGanttList(query?: object) {
  return request({ url: '/admin/thMeetingApply/roomGanttList', method: 'GET', query });
}

export function getPersonByPersonCode(query?: object) {
  return request({ url: '/admin/hrPerson/getPersonByPersonCode', method: 'GET', query });
}
